package com.happyclub.pojo;

import javax.persistence.*;
import java.sql.Time;
import java.util.Objects;

@Entity
@Table(name = "TB_TRAVEL_COMMONT", schema = "SCOTT")
public class TbTravelCommont {
    private String id;
    private String travelId;
    private String userId;
    private String commontContext;
    private Time commontTime;
    private Time updateTime;
    private Time createTime;
    private String userName;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "TRAVEL_ID")
    public String getTravelId() {
        return travelId;
    }

    public void setTravelId(String travelId) {
        this.travelId = travelId;
    }

    @Basic
    @Column(name = "USER_ID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "COMMONT_CONTEXT")
    public String getCommontContext() {
        return commontContext;
    }

    public void setCommontContext(String commontContext) {
        this.commontContext = commontContext;
    }

    @Basic
    @Column(name = "COMMONT_TIME")
    public Time getCommontTime() {
        return commontTime;
    }

    public void setCommontTime(Time commontTime) {
        this.commontTime = commontTime;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    public Time getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Time updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Time getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Time createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "USER_NAME")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbTravelCommont that = (TbTravelCommont) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(travelId, that.travelId) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(commontContext, that.commontContext) &&
                Objects.equals(commontTime, that.commontTime) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(userName, that.userName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, travelId, userId, commontContext, commontTime, updateTime, createTime, userName);
    }
}
